import { lazy } from "react";

const routes = [
    {
        path: '/',
        to: '/home/article'
    },
    {
        path: '/home',
        component: lazy(() => import('../pages/Home')),
        children: [
            // 文章
            {
                path: '/home/article',
                component: lazy(() => import('../pages/article/Index')),
                children: [
                    // 文章 下  所有
                    {
                        path: '/home/article/all',
                        component: lazy(() => import('../pages/article/childrens/All')),
                    }
                ]
            },
            // 归档
            {
                path: '/home/archived',
                component: lazy(() => import('../pages/archived/Index')),
            },
            // 知识小册
            {
                path: '/home/knowledge',
                component: lazy(() => import('../pages/knowledge/Index')),
            }
        ]
    },
]

export default routes